from django.template.response import TemplateResponse

from home.models import HomePage


def home_page(request):
    data = HomePage.objects.filter(is_show=True).order_by('-pk').first()
    context = {'data': data}
    return TemplateResponse(request, 'home/index.html', context)


def home_page_gallery(request):
    data = HomePage.objects.filter(is_show=True).order_by('-pk').first()
    context = {'data': data}
    return TemplateResponse(request, 'home/gallery.html', context)


def home_page_contact(request):
    data = HomePage.objects.filter(is_show=True).order_by('-pk').first()
    context = {'data': data}
    return TemplateResponse(request, 'home/contact.html', context)
